package com.tomehay.termprojectmanage_server.mapper;

import com.tomehay.termprojectmanage_server.pojo.Model.TaskGrades;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author tomehay
 * @since 2023-06-20
 */
public interface TaskGradesMapper extends BaseMapper<TaskGrades> {
    @Select("SELECT task_grades.* " +
            "from task_grades,group_task,allocation,termproject " +
            "WHERE termproject.course_id = #{course_id} AND termproject.id =allocation.term_project_id " +
            "AND allocation.id = group_task.allocation_id " +
            "AND task_grades.group_task_id = group_task.id")
    List<TaskGrades> getByCourseID(int course_id);
}
